const Mock = require('mockjs');
let user = Mock.mock({
  'user|5': [
    {
      'userID|+1': 1,
      username: '@cname',
      tel: /^1(5|3|7|8)[0-9]{9}$/,
      userid: '@guid',
      'userInfo|1-3': 1,
      'star|1-5': '★',
    },
  ],
});

Mock.mock(/user\/users/, 'get', () => {
  //三个参数。第一个：路径，第二个：请求方式post/get，第三个：回调，返回值
  return user;
});
